home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / bootslow.zip / SOURCE.ZIP / MKBOOT.ASM < prev    next >
Assembly Source File  |  1991-08-06  |  2KB  |  89 lines

  1. ;
  2. ;; SlowDown for self-booting software
  3. ;;
  4. ;; BOOTSLOW
  5. ;;
  6. ;; Copyright 1991 Alexander R. Pruss
  7. ;;
  8. ;; May be freely distributed, modified and used provided that no copyright
  9. ;; messages are removed, and this sentence together with the next two are
  10. ;; always included in unmodified form.  If you like this program a lot, you are
  11. ;; invited to show your appreciation by making a tax-deductible donation to
  12. ;; the Pro-Life or Anti-Abortion movement, but are under no obligation, moral
  13. ;; or otherwise to do so (especially if you disagree with the goals of this
  14. ;; movement.)  There is no warranty; use at own risk.
  15. ;
  16.     include macros.inc
  17. c segment
  18.     org 100h
  19. BEGIN:
  20.     assume CS:c,DS:c
  21.     Puts copyright
  22.     mov ax,OpenRDOnly
  23.     mov dx,offset filename
  24.     int 21h
  25.     jc openerror
  26.     mov bx,ax
  27.     mov ah,ReadHandle
  28.     mov cx,512
  29.     mov dx,offset bootsec
  30.     int 21h
  31.     pushf
  32.     mov ah,CloseHandle
  33.     int 21h
  34.     popf
  35.     jc openerror
  36.  
  37.     Puts drive_q
  38. g:
  39.     DOSGetch
  40.     or al,TOLOWER
  41.     cmp al,'a'
  42.     jb g
  43.     cmp al,'z'
  44.     ja g
  45.     sub al,'a'
  46.     mov dl,al
  47.  
  48.     push ds
  49.     pop es
  50.     mov ax,0301h
  51.     mov cx,0001h
  52.     Clear dh
  53.     mov bx,offset bootsec
  54.     int 13h
  55.     jc diskerror
  56.     Puts done
  57.     mov ax,4c00h
  58.     int 21h
  59.  
  60. openerror:
  61.     Puts cantopen
  62.     mov ax,4c01h
  63.     int 21h
  64.  
  65. diskerror:
  66.     Puts i13error
  67.     mov ax,4c02h
  68.     int 21h
  69.  
  70. _puts proc near
  71. top:
  72.     mov bx,1
  73.     mov dx,si
  74.     mov ah,WriteHandle
  75.     int 21h
  76.     ret
  77. _puts endp
  78.  
  79. String copyright, <'Interrupt table recorder.', CR,LF, '(C) Copyright 1991 Alexander Pruss', CR,LF>
  80. String cantopen, <'Error reading bootsec.bin.',CR,LF>
  81. String drive_q, <'Choose physical floppy drive to save boot sector to: (A,B,etc.)', CR,LF>
  82. String i13error, <'Low level disk error.',CR,LF>
  83. String done, <'Done!',CR,LF>
  84. filename db 'bootsec.bin',00
  85. bootsec:
  86.  
  87. c ends
  88. end BEGIN
  89.